Conversation
- Implement Flask-based DevOps Info Service (Python) - Add GET / endpoint with service, system, runtime, and request info - Add GET /health endpoint for monitoring - Implement environment variable configuration (HOST, PORT, DEBUG) - Add comprehensive documentation (README.md and LAB01.md) - Include best practices: PEP 8, error handling, logging - Add GitHub Community engagement section - Implement bonus task: Go version of the service - Add testing screenshots and evidence - Pin dependencies in requirements.txt - Configure .gitignore for Python and Go
- Add pytest unit tests (15 tests covering all endpoints) - Add GitHub Actions workflow with matrix testing (Python 3.11, 3.12) - Add ruff linter integration - Add Docker build/push with CalVer versioning - Add status badge to README - Add LAB03.md documentation Best practices: - Dependency caching via setup-python - Docker layer caching via Buildx - Job dependencies (docker needs lint-test) - Fail-fast matrix strategy - Concurrency with cancel-in-progress - Path filters for monorepo efficiency
- Docker build always runs (validates Dockerfile) - Docker push only when DOCKERHUB secrets are configured - Graceful handling when secrets not available
- Add .github/workflows/go-ci.yml for Go application - Language-specific linting with golangci-lint - Go testing with race detector and coverage - Snyk security scanning for Go dependencies - Docker build and push with CalVer versioning - Path-based triggers for monorepo optimization - Separate Docker image: pepegx/devops-info-service-go - Parallel execution with Python CI workflow
…i-app support Completes all main tasks (10pts) and bonus tasks (2.5pts): MAIN TASKS (10pts): - Unit Testing (3pts): pytest framework, 15 tests, 80% coverage - GitHub Actions CI (4pts): python-ci.yml with matrix build, linting, testing, Docker push - CI Best Practices (3pts): status badge, caching, Snyk security scanning BONUS (2.5pts): - Multi-App CI: go-ci.yml with path-based triggers - Test Coverage: codecov integration with XML reporting All requirements verified locally and ready for GitHub Actions execution.
- Fix codecov action file path (app_python/coverage.xml) - Add CODECOV_TOKEN secret to codecov action - Fix Snyk actions with proper file paths for both Python and Go - Add Go CI status badge to app_go/README.md - Fix codecov badge URL in app_python/README.md (remove token param) All Lab03 requirements verified: - 15 unit tests passing with 80% coverage - Matrix builds for Python 3.11/3.12 - Snyk security scanning configured - CalVer versioning implemented - Path filters for monorepo
- Add main_test.go with 12 comprehensive unit tests - Test all endpoints: /, /health, 404 handler - Test helper functions: getEnv, getUptime, getSystemInfo - Test custom mux wrapper with subtests - Update README with unit testing documentation - Update LAB03.md with test details Coverage: 67.2% of statements
- Add pyproject.toml with 70% coverage threshold - Configure pytest-cov fail-under for CI enforcement - Add codecov upload for Go workflow - Update LAB03.md with new coverage stats (98%) - Simplify pytest command to use pyproject.toml config Coverage improvements: - Python: 98% coverage with 70% threshold - Go: 67.2% coverage with codecov integration
- Refactor main.go: extract setupRouter() and printStartupBanner() - Add TestSetupRouter to test router configuration - Add TestPrintStartupBanner to test startup output - Add TestDebugMode to test handlers with debug=true - Coverage increased from 67.2% to 87.3% (above 70% threshold)
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR delivers Lab 4: Infrastructure as Code (Terraform & Pulumi).
It adds a full Terraform and Pulumi implementation for Yandex Cloud infrastructure, supporting documentation, and CI validation for Terraform.
Scope of Changes
Terraform
terraform/:main.tf,variables.tf,outputs.tf,versions.tf.tflint.hcl,.gitignore,terraform.tfvars.example.terraform.lock.hclfor reproducibilityenable_github_bonus(defaultfalse)Pulumi
pulumi/:Pulumi.yaml,__main__.py,requirements.txt,README.md,.gitignoreallowed_ssh_cidrrequired when SG is enabled0.0.0.0/0for SSH CIDRDocumentation
terraform/docs/LAB04.mdCI/CD
.github/workflows/terraform-ci.ymlterraform fmt -checkterraform init -backend=falseterraform validate -no-colortflintterraform/**changes@master)Validation Performed
terraform validate -no-color✅tflint --format compact✅terraform plan(main scenario, SG enabled) ✅pulumi preview(SG enabled) ✅python3 -m py_compile pulumi/__main__.py✅Known Limitation
Cloud provisioning in Yandex Cloud is blocked by folder IAM permissions (
resource-manager.folder/ SG ingress permissions).Because of this, cloud VM SSH proof is blocked by external IAM constraints; local fallback evidence is documented in
LAB04.mdper lab alternative guidance.